]> permondes.de Git - Analog_Engine.git/blame_incremental - scripts/TP1 03.08 Charge in em field.AESL
Focus on potential fields
[Analog_Engine.git] / scripts / TP1 03.08 Charge in em field.AESL
... / ...
CommitLineData
1IDENTIFICATION DIVISION
2PROGRAM-ID ChargeInEMfield
3VERSION 20240116
4COMMENT A mass m with charge q>0 is located in a static electro-magnetic field [0,0,E], [0,-B,0].
5COMMENT Find the trajetory
6COMMENT Differential equation (Lorentz force): x'' = omega*z', z'' = a*omega^2 - omega*x'
7COMMENT good start settings are omega=0,92, a*omega^2=0,05
8
9ENVIRONMENT DIVISION
10ENGINE Anabrid-THAT
11TIMEBASE 1ms # corresponds to 1s
12REQUIRES INTEGRATOR 4, INVERTER 1, COEFFICIENT 3
13
14DATA DIVISION
15OUTPUT OUTPUT.X x
16OUTPUT OUTPUT.Z z
17COEFFICIENT.1 OMEGA_X # -omega for x'
18COEFFICIENT.2 A*OMEGA^2
19COEFFICIENT.3 OMEGA_z # omega for z'
20
21PROGRAM DIVISION
22x'' -> INTEGRATOR -> -x'
23-x' -> INTEGRATOR -> x
24-x' -> COEFFICIENT.OMEGA_X -> -omega*x'
25+1 -> COEFFICIENT.A*OMEGA^2 -> a*omega^2
26a*omega^2, -omega*x' -> INTEGRATOR -> -z' # input is z''
27-z' -> INTEGRATOR -> z
28-z' -> INVERTER -> z'
29z' -> COEFFICIENT.OMEGA_Z -> omega*z' = x''
30
31OPERATION DIVISION
32MODE REPEAT
33OP-TIME 21ms